package com.quick.develop.form.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 表单字段
 *
 * @author Tioo 1906559468@qq.com
 * @since 1.0.0 2023-09-24
 */
@EqualsAndHashCode(callSuper = false)
@Data
@TableName("gen_dynamic_form_field")
public class GenDynamicFormFieldEntity {

    /**
     * 表单ID
     */
    @TableId
    private Integer id;

    private Integer formId;

    /**
     * 字段Key
     */
    private String fieldKey;

    /**
     * 字段名称
     */
    private String fieldNameZh;

    /**
     * 字段英文名称
     */
    private String fieldNameCn;

    /**
     * 栅格
     */
    private Integer span;

    /**
     * 组件类型
     */
    private String type;

    /**
     * 默认值
     */
    private String defaultValue;

    /**
     * 占位提示符
     */
    private String placeholder;

    /**
     * 是否隐藏
     */
    private Boolean hidden;

    /**
     * 是否禁用
     */
    private Boolean disabled;

    /**
     * 是否只读
     */
    private Boolean readonly;

    /**
     * 是否清空
     */
    private Boolean clearable;

    /**
     * 是否必填
     */
    private Boolean required;

    /**
     * 校验消息
     */
    private String validMessage;

    /**
     * 扩展信息
     */
    @JsonFormat()
    private String attributes;

    /**
     * 更改事件
     */
    private String changeEvent;

    /**
     * 输入事件
     */
    private String inputEvent;

    /**
     * 失去焦点
     */
    private String blurEvent;

    /**
     * 获得焦点
     */
    private String focusEvent;

    private Integer groupId;

    private Integer orderNum;

    private String name;

    private String label;

    private String alias;

    @TableField(value = "_trigger")
    private String trigger;

    private String depend;

    private Boolean isVariable;

    private String width;

    private String dictKey;
}